﻿-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE SetProperty
	-- Add the parameters for the stored procedure here
	@propName varchar(50), 
	@propValue varchar(max)
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    -- Insert statements for procedure here
	if (select 1 from Properties where PropName like @propName)=1 
	begin
		update Properties 
		set PropValue=@propValue
		where PropName like @propName;
	end
	else
	begin
		insert into Properties
		(PropName, PropValue)
		values (@propName, @propValue);
	end
END
